<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 操作对象的属性就两种,点语法,中括号语法 */
        const obj = {
            name:"张三",
            age:18
        }
        console.log(obj.name);//点语法

        for(let key in obj){
            console.log(key,obj.key);
        }
    </script>
</body>
</html>